<?php

/**
 * Actividades_Paciente_Realizadas form base class.
 *
 * @method Actividades_Paciente_Realizadas getObject() Returns the current form's model object
 *
 * @package    citologia
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseActividades_Paciente_RealizadasForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'             => new sfWidgetFormInputHidden(),
      'pacientes_id'   => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Pacientes'), 'add_empty' => false)),
      'actividades_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Actividades'), 'add_empty' => false)),
      'fechaactividad' => new sfWidgetFormDate(),
      'usuarios_id'    => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Usuarios'), 'add_empty' => false)),
      'created_at'     => new sfWidgetFormDateTime(),
      'updated_at'     => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'             => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'pacientes_id'   => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Pacientes'))),
      'actividades_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Actividades'))),
      'fechaactividad' => new sfValidatorDate(array('required' => false)),
      'usuarios_id'    => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Usuarios'))),
      'created_at'     => new sfValidatorDateTime(),
      'updated_at'     => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('actividades_paciente_realizadas[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Actividades_Paciente_Realizadas';
  }

}
